From: Jeremy BĂ­cha Date: Mon, 15 Sep 2025 22:36:17 +0000 (-0400) Subject: Remove tray-icons patches applied in new release X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~88^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b85d93ce9057c87ff3e020ebf80c98fa8f586e6f;p=gnome-shell.git Remove tray-icons patches applied in new release --- diff --git a/debian/patches/series b/debian/patches/series index 41a4509a8..39579f926 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,13 +1,4 @@ debian/Revert-tests-Fail-on-warnings-too.patch -tray-icons/build-Add-explicit-dependency-on-Xfixes.patch -tray-icons/tray-na-xembed-Use-XShape-to-remove-input-on-socket-windo.patch -tray-icons/shell-tray-icon-Use-available-space-when-that-s-defined.patch -tray-icons/shell-tray-Ensure-that-only-a-child-can-be-added.patch -tray-icons/shell-tray-icon-Trigger-a-relayout-when-the-underneath-xe.patch -tray-icons/tray-Zero-initialize-the-event-structures-on-initializati.patch -tray-icons/tray-na-xembed-Use-proper-indentation-style-header.patch -tray-icons/tray-na-xembed-Destroy-socket-window-when-ending-the-embe.patch -tray-icons/tray-na-tray-manager-Remove-outdated-comment-and-return-v.patch shell-app-Warn-instead-of-crashing-if-disposed-before-sta.patch st-theme-node-Forget-properties-cache-on-stylesheet-chang.patch debian/data-Add-im-config.desktop-to-System-folder.patch diff --git a/debian/patches/tray-icons/build-Add-explicit-dependency-on-Xfixes.patch b/debian/patches/tray-icons/build-Add-explicit-dependency-on-Xfixes.patch deleted file mode 100644 index a78e4980f..000000000 --- a/debian/patches/tray-icons/build-Add-explicit-dependency-on-Xfixes.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 22:33:43 +0200 -Subject: build: Add explicit dependency on Xfixes - -We use the xfixes extensions in tray icons but we rely on the dependency -brought to us from other libraries as mutter but let's make it explicit - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - meson.build | 1 + - src/tray/meson.build | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index ffae529..e0ac102 100644 ---- a/meson.build -+++ b/meson.build -@@ -93,6 +93,7 @@ have_x11 = mutter_dep.get_variable('have_x11') == 'true' - have_x11_client = mutter_dep.get_variable('have_x11_client') == 'true' - if have_x11_client or have_x11 - x11_dep = dependency('x11') -+ xfixes_dep = dependency('xfixes') - endif - - if not have_fonts -diff --git a/src/tray/meson.build b/src/tray/meson.build -index 1a86bcb..2fc73f3 100644 ---- a/src/tray/meson.build -+++ b/src/tray/meson.build -@@ -9,6 +9,6 @@ tray_sources = [ - - libtray = static_library('tray', tray_sources, - c_args: ['-DG_LOG_DOMAIN="notification_area"'], -- dependencies: [mutter_dep, mtk_dep], -+ dependencies: [mutter_dep, mtk_dep, xfixes_dep], - include_directories: conf_inc - ) diff --git a/debian/patches/tray-icons/shell-tray-Ensure-that-only-a-child-can-be-added.patch b/debian/patches/tray-icons/shell-tray-Ensure-that-only-a-child-can-be-added.patch deleted file mode 100644 index d5a2ffbd8..000000000 --- a/debian/patches/tray-icons/shell-tray-Ensure-that-only-a-child-can-be-added.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 04:19:34 +0200 -Subject: shell-tray: Ensure that only a child can be added - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/shell-tray-icon.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/shell-tray-icon.c b/src/shell-tray-icon.c -index 39204bf..9b79c2b 100644 ---- a/src/shell-tray-icon.c -+++ b/src/shell-tray-icon.c -@@ -239,6 +239,7 @@ shell_tray_icon_set_child (ShellTrayIcon *tray_icon, - MetaDisplay *display = shell_global_get_display (shell_global_get ()); - - g_return_if_fail (tray_icon != NULL); -+ g_return_if_fail (tray_icon->tray_child == NULL); - g_return_if_fail (tray_child != NULL); - - /* We do all this now rather than computing it on the fly later, diff --git a/debian/patches/tray-icons/shell-tray-icon-Trigger-a-relayout-when-the-underneath-xe.patch b/debian/patches/tray-icons/shell-tray-icon-Trigger-a-relayout-when-the-underneath-xe.patch deleted file mode 100644 index 3a59d174d..000000000 --- a/debian/patches/tray-icons/shell-tray-icon-Trigger-a-relayout-when-the-underneath-xe.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 04:20:42 +0200 -Subject: shell-tray-icon: Trigger a relayout when the underneath xembeded - size changes - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/shell-tray-icon.c | 4 ++++ - src/tray/na-xembed.c | 18 ++++++++++++++++++ - src/tray/na-xembed.h | 1 + - 3 files changed, 23 insertions(+) - -diff --git a/src/shell-tray-icon.c b/src/shell-tray-icon.c -index 9b79c2b..c9be146 100644 ---- a/src/shell-tray-icon.c -+++ b/src/shell-tray-icon.c -@@ -260,6 +260,10 @@ shell_tray_icon_set_child (ShellTrayIcon *tray_icon, - "window-created", - G_CALLBACK (shell_tray_icon_window_created_cb), - tray_icon); -+ -+ g_signal_connect_object (tray_child, "reconfigured", -+ G_CALLBACK (clutter_actor_queue_relayout), -+ tray_icon, G_CONNECT_SWAPPED); - } - - /* -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index d4c389c..be08d6d 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -91,6 +91,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (NaXembed, na_xembed, G_TYPE_OBJECT) - enum { - PLUG_ADDED, - PLUG_REMOVED, -+ RECONFIGURED, - LAST_SIGNAL - }; - -@@ -548,6 +549,15 @@ xembed_filter_func (MetaX11Display *x11_display, - } - break; - } -+ case ConfigureNotify: -+ { -+ XConfigureEvent *xce = &xevent->xconfigure; -+ -+ if (xce->window == priv->socket_window) -+ g_signal_emit (xembed, signals[RECONFIGURED], 0); -+ -+ break; -+ } - case DestroyNotify: - { - XDestroyWindowEvent *xdwe = &xevent->xdestroywindow; -@@ -742,6 +752,14 @@ na_xembed_class_init (NaXembedClass *klass) - NULL, NULL, NULL, - G_TYPE_NONE, 0); - -+ signals[RECONFIGURED] = -+ g_signal_new ("reconfigured", -+ G_OBJECT_CLASS_TYPE (klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET (NaXembedClass, reconfigured), -+ NULL, NULL, NULL, -+ G_TYPE_NONE, 0); -+ - props[PROP_X11_DISPLAY] = - g_param_spec_object ("x11-display", NULL, NULL, - META_TYPE_X11_DISPLAY, -diff --git a/src/tray/na-xembed.h b/src/tray/na-xembed.h -index 271060d..801c6a6 100644 ---- a/src/tray/na-xembed.h -+++ b/src/tray/na-xembed.h -@@ -35,6 +35,7 @@ struct _NaXembedClass - - void (* plug_added) (NaXembed *xembed); - void (* plug_removed) (NaXembed *xembed); -+ void (* reconfigured) (NaXembed *xembed); - }; - - MetaX11Display * na_xembed_get_x11_display (NaXembed *xembed); diff --git a/debian/patches/tray-icons/shell-tray-icon-Use-available-space-when-that-s-defined.patch b/debian/patches/tray-icons/shell-tray-icon-Use-available-space-when-that-s-defined.patch deleted file mode 100644 index 59cd130ee..000000000 --- a/debian/patches/tray-icons/shell-tray-icon-Use-available-space-when-that-s-defined.patch +++ /dev/null @@ -1,111 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 04:18:50 +0200 -Subject: shell-tray-icon: Use available space when that's defined - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7613 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/shell-tray-icon.c | 4 ++++ - src/tray/na-xembed.c | 29 +++++++++++++++++++++++++++++ - src/tray/na-xembed.h | 4 ++++ - 3 files changed, 37 insertions(+) - -diff --git a/src/shell-tray-icon.c b/src/shell-tray-icon.c -index 462945e..39204bf 100644 ---- a/src/shell-tray-icon.c -+++ b/src/shell-tray-icon.c -@@ -185,6 +185,10 @@ shell_tray_icon_allocate (ClutterActor *actor, - - CLUTTER_ACTOR_CLASS (shell_tray_icon_parent_class)->allocate (actor, box); - -+ na_xembed_set_available_size (NA_XEMBED (tray_icon->tray_child), -+ roundf (clutter_actor_box_get_width (box)), -+ roundf (clutter_actor_box_get_height (box))); -+ - /* Find the actor's new coordinates in terms of the stage. - */ - clutter_actor_get_transformed_position (actor, &wx, &wy); -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index 1be1e9d..d4c389c 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -43,6 +43,8 @@ struct _NaXembedPrivate - int request_height; - int current_width; - int current_height; -+ int available_width; -+ int available_height; - int resize_count; - int xembed_version; - -@@ -141,6 +143,8 @@ na_xembed_end_embedding (NaXembed *xembed) - priv->current_width = 0; - priv->current_height = 0; - priv->resize_count = 0; -+ priv->available_width = -1; -+ priv->available_height = -1; - g_clear_handle_id (&priv->resize_id, g_source_remove); - } - -@@ -186,6 +190,11 @@ na_xembed_synchronize_size (NaXembed *xembed) - width = priv->request_width; - height = priv->request_height; - -+ if (priv->available_width >= 0) -+ width = priv->available_width; -+ if (priv->available_height >= 0) -+ height = priv->available_height; -+ - XMoveResizeWindow (xdisplay, - priv->socket_window, - x, y, -@@ -745,6 +754,10 @@ na_xembed_class_init (NaXembedClass *klass) - static void - na_xembed_init (NaXembed *xembed) - { -+ NaXembedPrivate *priv = na_xembed_get_instance_private (xembed); -+ -+ priv->available_width = -1; -+ priv->available_height = -1; - } - - void -@@ -809,6 +822,22 @@ na_xembed_get_size (NaXembed *xembed, - *height = priv->request_height; - } - -+void -+na_xembed_set_available_size (NaXembed *xembed, -+ int width, -+ int height) -+{ -+ NaXembedPrivate *priv = na_xembed_get_instance_private (xembed); -+ -+ if (priv->available_width == width && priv->available_height == height) -+ return; -+ -+ priv->available_width = width; -+ priv->available_height = height; -+ -+ na_xembed_resize (xembed); -+} -+ - void - na_xembed_get_root_position (NaXembed *xembed, - int *x, -diff --git a/src/tray/na-xembed.h b/src/tray/na-xembed.h -index 4466305..271060d 100644 ---- a/src/tray/na-xembed.h -+++ b/src/tray/na-xembed.h -@@ -58,6 +58,10 @@ void na_xembed_get_size (NaXembed *xembed, - int *width, - int *height); - -+void na_xembed_set_available_size (NaXembed *xembed, -+ int width, -+ int height); -+ - void na_xembed_set_background_color (NaXembed *xembed, - const CoglColor *color); - diff --git a/debian/patches/tray-icons/tray-Zero-initialize-the-event-structures-on-initializati.patch b/debian/patches/tray-icons/tray-Zero-initialize-the-event-structures-on-initializati.patch deleted file mode 100644 index ebb87e0fb..000000000 --- a/debian/patches/tray-icons/tray-Zero-initialize-the-event-structures-on-initializati.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 04:22:29 +0200 -Subject: tray: Zero-initialize the event structures on initialization - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/tray/na-tray-child.c | 6 +++--- - src/tray/na-xembed.c | 6 ++---- - 2 files changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/tray/na-tray-child.c b/src/tray/na-tray-child.c -index 0911995..9ec6670 100644 ---- a/src/tray/na-tray-child.c -+++ b/src/tray/na-tray-child.c -@@ -260,9 +260,9 @@ na_tray_child_emulate_event (NaTrayChild *tray_child, - ClutterEvent *event) - { - MetaX11Display *x11_display; -- XKeyEvent xkevent; -- XButtonEvent xbevent; -- XCrossingEvent xcevent; -+ XKeyEvent xkevent = {0}; -+ XButtonEvent xbevent = {0}; -+ XCrossingEvent xcevent = {0}; - Display *xdisplay; - Window xwindow, xrootwindow; - ClutterEventType event_type = clutter_event_type (event); -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index be08d6d..398669c 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -115,9 +115,8 @@ xembed_send_message (NaXembed *xembed, - { - NaXembedPrivate *priv = na_xembed_get_instance_private (xembed); - Display *xdisplay = meta_x11_display_get_xdisplay (priv->x11_display); -- XClientMessageEvent xclient; -+ XClientMessageEvent xclient = {0}; - -- memset (&xclient, 0, sizeof (xclient)); - xclient.window = recipient; - xclient.type = ClientMessage; - xclient.message_type = priv->atom__XEMBED; -@@ -153,10 +152,9 @@ static void - na_xembed_send_configure_event (NaXembed *xembed) - { - NaXembedPrivate *priv = na_xembed_get_instance_private (xembed); -- XConfigureEvent xconfigure; -+ XConfigureEvent xconfigure = {0}; - Display *xdisplay = meta_x11_display_get_xdisplay (priv->x11_display); - -- memset (&xconfigure, 0, sizeof (xconfigure)); - xconfigure.type = ConfigureNotify; - - xconfigure.event = priv->plug_window; diff --git a/debian/patches/tray-icons/tray-na-tray-manager-Remove-outdated-comment-and-return-v.patch b/debian/patches/tray-icons/tray-na-tray-manager-Remove-outdated-comment-and-return-v.patch deleted file mode 100644 index 4fa3ef9e9..000000000 --- a/debian/patches/tray-icons/tray-na-tray-manager-Remove-outdated-comment-and-return-v.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 20:54:46 +0200 -Subject: tray/na-tray-manager: Remove outdated comment and return value - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/tray/na-tray-manager.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/src/tray/na-tray-manager.c b/src/tray/na-tray-manager.c -index 2d95d6a..7c630bd 100644 ---- a/src/tray/na-tray-manager.c -+++ b/src/tray/na-tray-manager.c -@@ -244,7 +244,7 @@ na_tray_manager_new (MetaX11Display *x11_display) - NULL); - } - --static gboolean -+static void - na_tray_manager_plug_removed (NaTrayChild *tray_child, - NaTrayManager *manager) - { -@@ -255,9 +255,6 @@ na_tray_manager_plug_removed (NaTrayChild *tray_child, - g_hash_table_remove (manager->children, - GINT_TO_POINTER (icon_window)); - g_signal_emit (manager, manager_signals[TRAY_ICON_REMOVED], 0, tray_child); -- -- /* This destroys the socket. */ -- return FALSE; - } - - static void diff --git a/debian/patches/tray-icons/tray-na-xembed-Destroy-socket-window-when-ending-the-embe.patch b/debian/patches/tray-icons/tray-na-xembed-Destroy-socket-window-when-ending-the-embe.patch deleted file mode 100644 index 0f4143718..000000000 --- a/debian/patches/tray-icons/tray-na-xembed-Destroy-socket-window-when-ending-the-embe.patch +++ /dev/null @@ -1,111 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 05:56:48 +0200 -Subject: tray/na-xembed: Destroy socket window when ending the embedding - -Currently when embedding a tray icon is ended we are leaving the X11 -socket window around as we don't really destroy it, while we're just -listening for its child destruction. - -So, when embedding is ending we need to make sure that: - - If the plug window is still alive, move it back to its old parent - (normally that's the root window, but we query for it, to be sure) - - If the plug window has been already destroyed or reparented (by us or - by something else), we've to just destroy the socket window - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7614 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/tray/na-xembed.c | 39 ++++++++++++++++++++++++++++++++++++++- - 1 file changed, 38 insertions(+), 1 deletion(-) - -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index 4ef3666..588e034 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -36,6 +36,7 @@ struct _NaXembedPrivate - MetaX11Display *x11_display; - Window socket_window; - Window plug_window; -+ Window old_parent; - - int root_x; - int root_y; -@@ -139,7 +140,26 @@ na_xembed_end_embedding (NaXembed *xembed) - { - NaXembedPrivate *priv = na_xembed_get_instance_private (xembed); - -+ if (priv->socket_window) -+ { -+ Display *xdisplay = meta_x11_display_get_xdisplay (priv->x11_display); -+ -+ mtk_x11_error_trap_push (xdisplay); -+ -+ if (priv->plug_window && priv->old_parent) -+ XReparentWindow (xdisplay, -+ priv->plug_window, -+ priv->old_parent, -+ 0, 0); -+ -+ XDestroyWindow (xdisplay, priv->socket_window); -+ priv->socket_window = None; -+ -+ mtk_x11_error_trap_pop (xdisplay); -+ } -+ - priv->plug_window = None; -+ priv->old_parent = None; - priv->current_width = 0; - priv->current_height = 0; - priv->resize_count = 0; -@@ -413,6 +433,18 @@ na_xembed_add_window (NaXembed *xembed, - &socket_attrs); - - XUnmapWindow (xdisplay, priv->plug_window); /* Shouldn't actually be necessary for XEMBED, but just in case */ -+ -+ if (!priv->old_parent) -+ { -+ g_autofree Window *children = NULL; -+ unsigned int n_children; -+ Window root; -+ -+ if (!XQueryTree (xdisplay, priv->plug_window, &root, &priv->old_parent, -+ &children, &n_children)) -+ priv->old_parent = meta_x11_display_get_xroot (priv->x11_display); -+ } -+ - XReparentWindow (xdisplay, - priv->plug_window, - priv->socket_window, -@@ -563,10 +595,14 @@ xembed_filter_func (MetaX11Display *x11_display, - /* Note that we get destroy notifies both from SubstructureNotify on - * our window and StructureNotify on socket->plug_window - */ -+ if (priv->socket_window && xdwe->window == priv->socket_window) -+ priv->socket_window = None; -+ - if (priv->plug_window && (xdwe->window == priv->plug_window)) - { - g_object_ref (xembed); - g_signal_emit (xembed, signals[PLUG_REMOVED], 0); -+ priv->plug_window = None; - na_xembed_end_embedding (xembed); - g_object_unref (xembed); - } -@@ -631,6 +667,7 @@ xembed_filter_func (MetaX11Display *x11_display, - { - g_object_ref (xembed); - g_signal_emit (xembed, signals[PLUG_REMOVED], 0); -+ priv->old_parent = None; - na_xembed_end_embedding (xembed); - g_object_unref (xembed); - } -@@ -696,7 +733,7 @@ na_xembed_finalize (GObject *object) - if (priv->x11_display && priv->event_func_id) - meta_x11_display_remove_event_func (priv->x11_display, priv->event_func_id); - -- if (priv->plug_window) -+ if (priv->plug_window || priv->socket_window) - na_xembed_end_embedding (xembed); - - G_OBJECT_CLASS (na_xembed_parent_class)->finalize (object); diff --git a/debian/patches/tray-icons/tray-na-xembed-Use-XShape-to-remove-input-on-socket-windo.patch b/debian/patches/tray-icons/tray-na-xembed-Use-XShape-to-remove-input-on-socket-windo.patch deleted file mode 100644 index 35ae3906b..000000000 --- a/debian/patches/tray-icons/tray-na-xembed-Use-XShape-to-remove-input-on-socket-windo.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 22:34:58 +0200 -Subject: tray/na-xembed: Use XShape to remove input on socket window - -We don't want this window to take any input as, a part from blocking the -events on the shell representation itself, they may potentially make the -plugged window to do anything with the event is processing (such as -showing tooltips). And we don't want this since we only want to send to -those windows only the synthetic events that we explicitly control. - -This was already the case before of commit ab60902058 but a similar -approach was not replicated, leading to input events being fully -processed from tray icons plugs. - -It requires adding an explicit build dependency on Xext, but this is -something that mutter already depends on so not really a new dependency - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7613 -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - meson.build | 1 + - src/tray/meson.build | 2 +- - src/tray/na-xembed.c | 15 +++++++++++++++ - 3 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index e0ac102..6564149 100644 ---- a/meson.build -+++ b/meson.build -@@ -93,6 +93,7 @@ have_x11 = mutter_dep.get_variable('have_x11') == 'true' - have_x11_client = mutter_dep.get_variable('have_x11_client') == 'true' - if have_x11_client or have_x11 - x11_dep = dependency('x11') -+ xext_dep = dependency('xext') - xfixes_dep = dependency('xfixes') - endif - -diff --git a/src/tray/meson.build b/src/tray/meson.build -index 2fc73f3..c91e940 100644 ---- a/src/tray/meson.build -+++ b/src/tray/meson.build -@@ -9,6 +9,6 @@ tray_sources = [ - - libtray = static_library('tray', tray_sources, - c_args: ['-DG_LOG_DOMAIN="notification_area"'], -- dependencies: [mutter_dep, mtk_dep, xfixes_dep], -+ dependencies: [mutter_dep, mtk_dep, xfixes_dep, xext_dep], - include_directories: conf_inc - ) -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index 75af21a..1be1e9d 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -24,6 +24,7 @@ - #include "na-xembed.h" - - #include -+#include - #include - #include - #include -@@ -362,6 +363,7 @@ na_xembed_add_window (NaXembed *xembed, - { - XSetWindowAttributes socket_attrs; - XWindowAttributes plug_attrs; -+ int shape_major, shape_minor; - int result; - - result = XGetWindowAttributes (xdisplay, priv->plug_window, &plug_attrs); -@@ -407,6 +409,19 @@ na_xembed_add_window (NaXembed *xembed, - priv->plug_window, - priv->socket_window, - 0, 0); -+ -+ /* Set an empty input shape on the window so that the socket does not -+ * get any input. Without this we the tray may still get events and for -+ * example show tooltips on hover which we don't want. -+ * This is the quickest way to achieve this, without having to deal these -+ * windows with specific code in mutter. -+ */ -+ if (XShapeQueryExtension (xdisplay, &shape_major, &shape_minor)) -+ { -+ XShapeSelectInput (xdisplay, priv->socket_window, NoEventMask); -+ XShapeCombineRectangles (xdisplay, priv->socket_window, ShapeInput, -+ 0, 0, NULL, 0, ShapeSet, 0); -+ } - } - - priv->have_size = FALSE; diff --git a/debian/patches/tray-icons/tray-na-xembed-Use-proper-indentation-style-header.patch b/debian/patches/tray-icons/tray-na-xembed-Use-proper-indentation-style-header.patch deleted file mode 100644 index ff50b100d..000000000 --- a/debian/patches/tray-icons/tray-na-xembed-Use-proper-indentation-style-header.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= -Date: Wed, 1 May 2024 05:54:31 +0200 -Subject: tray/na-xembed: Use proper indentation style header - -Origin: https://gitlab.gnome.org/3v1n0/gnome-shell/-/commits/tray-offscreen-xwindows -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2012388 ---- - src/tray/na-xembed.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tray/na-xembed.c b/src/tray/na-xembed.c -index 398669c..4ef3666 100644 ---- a/src/tray/na-xembed.c -+++ b/src/tray/na-xembed.c -@@ -1,4 +1,4 @@ --/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - /* Copyright (C) 2022 Red Hat Inc. - * - * This library is free software; you can redistribute it and/or